m=eval(input('m='))
n=eval(input('n='))
total = 0
if m>n:
    m,n=n,m
i=m
while i<=n:
    total = total+i
    i=i+1
print ('{}~{}的累加和为:{}'.format(m,n,total))
